Shell escape process arguments that are printed out
authorroot <root@localhost>
Sat, 2 May 2015 23:33:53 +0000 (01:33 +0200)
committerroot <root@localhost>
Tue, 2 Jun 2015 13:21:34 +0000 (15:21 +0200)
commitcd58dd28c58f6fd37581b0b36ec1f81dcc04008b
tree6a76d7907ade12e504ac8940968d28b9f6fdc0fa
parente91865c19a92a77e54d0be828e094e6d205f9555
Shell escape process arguments that are printed out

cargo build --verbose does output some command lines that cannot be
simply copy and pasted into the shell again. The problem is the
arguments which are output exactly like this: --feature="foo"

When pasted back into the shell, the shell will parse and remove the
double quotes. To counteract this, escape special shell characters when
printing commandlines. Cargo will print --feature=\"foo\" instead, which
can be pasted back into the shell.
src/cargo/util/mod.rs
src/cargo/util/process_builder.rs
src/cargo/util/shell_escape.rs [new file with mode: 0644]